package com.woniuxy.commons.entity;

import lombok.Data;
import lombok.experimental.Accessors;


public class ResponseEntity<T> {
	public static final int SUCCESS = 0;
	public static final int FAIL = 1;
	
	private int code;//状态码
	private String msg;//提示消息
	private T data;//数据
	private Long count;//总记录数,针对表格

	public Long getCount() {
		return count;
	}

	public void setCount(Long count) {
		this.count = count;
	}

	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public T getData() {
		return data;
	}
	public void setData(T data) {
		this.data = data;
	}
	public ResponseEntity(int code, String msg, T data) {
		this.code = code;
		this.msg = msg;
		this.data = data;
	}
	public ResponseEntity() {
		
	}
	public ResponseEntity(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}
	public ResponseEntity(int code, String msg,T data,Long count) {
		this.code = code;
		this.msg = msg;
		this.data = data;
		this.count= count;
	}
	
}
